package com.aiwei.tdjk.service;

import com.aiwei.tdjk.bean.Pager;
import com.aiwei.tdjk.dto.request.GetGroupPagerRequest;
import com.aiwei.tdjk.entity.Group;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by yanfeng on 2016/12/13.
 */
public interface GroupService {


    /**
     * 获取可用的的分组编号列表
     *
     * @param userId
     * @param organizationIds
     * @return
     */
    public Set<Long> findShowGroupIds(Long userId, Set<Long> organizationIds);

    /**
     * 获取默认分组
     * @return
     */
    List<Long> findDefaultGroupIds();

    /**
     * 获取分页列表
     * @param request
     * @return
     */
    Pager<Group> find(GetGroupPagerRequest request);

    Group get(Long id);

    void save(Group group);

    int update(Group group);

    int delete(Long id);

    int delete(Long[] ids);

    Set<Map<String, Object>> findIdAndNames(String searchType,String terms);
}
